package app.server.project.main.service.db.dao.user;

import app.server.project.main.service.db.entity.user.OrderDetailEntity;
import app.server.project.main.service.db.mapper.user.OrderDetailMapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Repository;

@Repository
public class OrderDetailDao extends ServiceImpl<OrderDetailMapper, OrderDetailEntity> {

    public OrderDetailEntity getOneByHash(String hash) {
        return this.getOne(Wrappers.lambdaQuery(OrderDetailEntity.class).eq(OrderDetailEntity::getTonHash, hash));
    }
    
}
